The field of computing is becoming more and more complex each day due to the proliferation of multiple programming languages, diverse processors, and multiple operating system environments. A number of programming languages with special capabilities (e.g., C++, Java, C#) are available now to provide programmers special advantages in programming various computing tasks. Similarly, various processors (e.g., X86, IA-64, AMD, etc.) are available to provide special advantages for executing particular tasks. For example, embedded processors are particularly suited for handling well defined tasks within electronic devices, whereas a general purpose processor such as an Intel® Pentium® processor is more flexible and can handle complex tasks. Thus, the diversity in computing environments, configurations and devices is increasing.
This increased need for diversity has complicated the already highly complex field of building compiler programs. Traditionally, compiler programs were written to compile software written in a particular source code language and were targeted to a particular type of processor architecture (e.g., IA-64, X86, AMD, ARM etc.). More recently, translator programs have been introduced that convert programs written in multiple source code languages to a single intermediate language representation (e.g., CIL (C++ Intermediate Language) and MSIL (Microsoft® Intermediate Language for .NET)). However, it is still complex and time consuming to retarget the compilation of one source code program among several different types of target architectures.
One suitable method for reducing the complexities of building compilers and other software development tools (e.g., analysis tools, optimizers) for multiple software development scenarios such as multiple languages and multiple targets is to develop an extensible core infrastructure or framework to which software extensions can be added to build specially configured compilers and other software development tools. For example, if a user wants to build a just-in-time (JIT) compiler configured for a certain target architecture, his or her task may be made easier by generating the JIT compiler by reusing the code of a core compiler framework and adding extensions with code specific to the JIT compiler type scenario. The same can be imagined for other software development tools such as optimizing tools, analysis tools, performance tools, testing tools, etc.
Building such customized compilers and other software development tools using such an extensible core compiler and tools framework is not without its own set of complexities. This is particularly true for an extensible compiler and tools framework that can be configured in multiple different ways to reflect multiple different software scenarios depending on languages, target architectures, and compiler types to be built (e.g., JIT, Pre-JIT, Native Optimizing Compiler etc.). One such complexity is related to defining data structures (e.g., object classes in a object-oriented language) of the core framework in a extensible manner such that extension fields dependent on multiple different software scenarios can be added to extend the data structures of the core framework. Traditional techniques of adding extension fields to a class definition can be used, but only at a hefty price paid for by reduced performance and increased code complexity, which can result in increased development and maintenance costs.
Thus, there is a need for a simple, but effective way for extending the object classes of a core framework software system using multiple different class extensions which depend on multiple different possible software development scenarios.